package com.wcpdoc.base.dao.impl;

import com.wcpdoc.base.dao.TagInfoDao;
import com.wcpdoc.base.dao.UserDao;
import com.wcpdoc.base.entity.TagInfo;
import com.wcpdoc.base.entity.User;
import com.wcpdoc.core.dao.impl.RBaseDaoImpl;
import com.wcpdoc.core.entity.PageIn;
import com.wcpdoc.core.entity.PageOut;
import com.wcpdoc.core.util.DateUtil;
import com.wcpdoc.core.util.HibernateUtil;
import com.wcpdoc.core.util.SqlUtil;
import com.wcpdoc.core.util.SqlUtil.Order;
import com.wcpdoc.core.util.ValidateUtil;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.query.NativeQuery;
import org.hibernate.query.Query;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 用户数据访问层实现
 *
 * v1.0 zhanghc 2016-6-15下午17:24:19
 */
@Repository
public class TagInfoDaoImpl extends RBaseDaoImpl<TagInfo> implements TagInfoDao {
	private static final Logger log = LoggerFactory.getLogger(TagInfoDaoImpl.class);

	@Override
	public List<TagInfo> getTagList() {
		String sql = "SELECT * FROM tag_info";
		return getList(sql);
	}

	@Override
	public TagInfo queryBYLabel(String label) {
		String sql = "SELECT * FROM tag_info WHERE label = :label ";
		return getEntity(sql, new Object[] { label });
	}

	@Override
	public void addTag(TagInfo tagInfo) {
		add(tagInfo);
	}


	@Override
	public PageOut getListpage(PageIn pageIn) {
		return null;
	}

	@Override
	public List<Map<String, Object>> getListUser(String id) {
		return null;
	}
}
